package MyInput;

import java.math.BigInteger;
import java.util.Scanner;

public class BigInteger1 {
    public static void main(String[] args) {
        BigInteger a, b, ans;
        Scanner scan = new Scanner(System.in);
        a = scan.nextBigInteger();
        b = scan.nextBigInteger();
        ans = a.add(b);//ans=a+b;
        System.out.println(ans);
        ans = a.subtract(b);//ans=a-b
        System.out.println(ans);
        ans = a.mod(b);//ans=a%b
        System.out.println(ans);
        ans = a.divide(b);//ans=a/b
        System.out.println(ans);
        ans = a.max(b);
        System.out.println(ans);
        ans = a.min(b);
        System.out.println(ans);
        ans = a.multiply(b);
        System.out.println(ans);

    }
}
